package com.zhijian.medical.config;

import java.util.Arrays;
import java.util.List;

/**
 * @author HCG
 * @version 1.0
 * @date 2021/7/6
 */
public class Constants {

    /**
     * web端token的key
     */
    public static final String MEDICAL_TOKEN = "MEDICALTOKEN";

    /**
     * TOKEN访问密钥
     */
    public static final String TOKEN_ACCESS_KEY = "TPyz12zzqYhhzfdX";

    /**
     * TOKEN认证密钥
     */
    public static final String TOKEN_SECRET_KEY = "b&Hky7HSsiancM88ijsUUhjrf652g1fa";

    /**
     * 用户登陆过期时间,默认2天
     */
    public static final int LOGIN_EXPIRE_TIME = 60 * 60 * 24 * 2;

    /**
     * 部门-供应商
     */
    public static final String GYS = "供应商";

    /**
     * 角色-试剂供应商
     */
    public static final String SJ_GYS = "试剂供应商";

    /**
     * 文件类型描述
     */
    public static final String FILE_TYPE_NOTE = "类型，" +
            "1：设备品类合同文件，" +
            "2：设备品类设备文件，" +
            "3：试剂品类合同档案，" +
            "4：试剂品类说明书，" +
            "5：试剂发票，" +
            "6：试剂出库单，" +
            "7：人员证书，" +
            "8：人员文章，" +
            "9：考核学习资料，" +
            "10：课题，" +
            "11：室间质评，" +
            "12：室间比对，" +
            "13：内部评审，" +
            "14：管理评审，" +
            "15：风险评估，" +
            "21：设备列表合同文件，" +
            "22：设备列表设备文件，";

    /**
     * 二维码前端页面地址后缀
     */
    public static final String QR_URL_PATH_END = "mobile";

    /**
     * pc端拦截器排除路径
     */
    static final List<String> TOKEN_EXCLUDE_PATHS = Arrays.asList(
            "/login",
            "/swagger-ui.html/**",
            "/swagger-resources/**",
            "/webjars/**",
            "/upload/file",
            "/upload/dsc/file",
            "/role/menu/test",
            "/product/send/out/detail/{code}",
            "/product/send/out/detail/harvest/{id}",
            "/new/file/preview/{id}",
            "/file/preview/{id}",
            "/preview",
            "/test",
            "/register/assessment",
            "/assessment/fix",
            "/email/send/fix",
            "/v2/**");

    /**
     * 缓存常量类
     */
    public static final class Redis {
        //后台管理用户登录token信息,如：{userno}:login:token
        public static final String USER_LOGIN_TOKEN = "%s%s:login:token";
        //生成token的后台管理用户信息，如：{token}:login:user
        public static final String TOKEN_LOGIN_USER = "%s:login:user";

        public static final String MEETING_KEY_CODE = "meetingKeyCode";
    }

    /**
     * 区域位置相关
     */
    public static final class Location {
        //没有分配位置
        public static final Long NO_LOCATION = -1L;
    }

    /**
     * 字典表类型
     */
    public static final class DictionaryType {
        //处理方式
        public static final String PROCESS_MODE = "process_mode";
        //结果描述与检测结果
        public static final String RESULT_DESCRIPTION = "result_description";
        //样本准备-肿瘤细胞比例说明
        public static final String SAMPLE_READY_ZLXBBL_NOTE = "sample_ready_zlxbbl_note";
        //核酸提取-OD260/280说明
        public static final String SAMPLE_HSTQ_OD260280 = "sample_hstq_od260280";
        //荧光PCR-核酸扩增一区-阴性室内质控-是否污染
        public static final String PCR_HSKZYQ_YXSNZK_SFWR = "pcr_hskzyq_yxsnzk_sfwr";
        //荧光PCR-核酸扩增一区-阴性室内质控-是否在控
        public static final String PCR_HSKZYQ_YXSNZK_SFZK = "pcr_hskzyq_yxsnzk_sfzk";
        //荧光PCR-核酸扩增一区-判定算法
        public static final String PCR_ALGORITHM = "pcr_algorithm";
        //一代测序-试剂配制区-体系一说明
        public static final String SANGER_SJPZQ_TX1 = "sanger_sjpzq_tx1";
        //一代测序-试剂配制区-体系二说明
        public static final String SANGER_SJPZQ_TX2 = "sanger_sjpzq_tx2";
        //一代测序-核酸纯化一区 （测序PCR试剂配制与加样）-测序PCR反应试剂说明
        public static final String SANER_HSCWYQ2_CXPCRFYSJ = "sanger_hscwyq2_cxpcrfysj";
        //二代测序-试剂配制区-试剂配制过程说明
        public static final String NGS_SJPZQ_SJ = "ngs_sjpzq_sj";
        //一代测序or二代测序的反应孔位置填写说明
        public static final String SANER_NGS_96 = "sanger_ngs_96";
    }

    /**
     * 荧光PCR实验相关
     */
    public static final class Pcr {
        public static final String STD = "STD";
        public static final String NTC = "NTC";
    }

}
